#!/bin/bash
openssl genrsa -out server.key -des 1024
openssl req -new -key server.key -x509 -out server.crt -config /etc/ssl/openssl.cnf
keytool -genkeypair -alias DoktorAlban -keysize 1024 -keystore DoktorAlban.jks -storepass jkspass -keypass keypass
keytool -certreq -alias DoktorAlban -keypass keypass -keystore DoktorAlban.jks -storepass jkspass -file DoktorAlban.csr
openssl x509 -req -in DoktorAlban.csr -CA server.crt -CAkey server.key -out DoktorAlban.crt -CAcreateserial -CAserial server.seq
keytool -importcert -alias server_crt -keypass keypass -file server.crt -keystore DoktorAlban.jks -storepass jkspass
keytool -importcert -alias DoktorAlban -keypass keypass -file DoktorAlban.crt -keystore DoktorAlban.jks -storepass jkspass

